package com.ang.exception.t1;

import java.util.stream.IntStream;

public class DemoException {
    public static void main(String[] args) {
        DemoException d = new DemoException();

        d.test1();
    }

    /**
     * 异常会中断后续的循环
     */
    public void test1(){
        DemoService ds = new DemoService();
        IntStream.range(0,10).forEach(i->{
            String str = ds.getStr(i);
            System.out.println(str);
        });
    }
}
